package com.wenda.admin.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.wenda.admin.core.StatisticProvider;
import com.wenda.admin.entity.TbFlow;
import com.wenda.admin.vo.FlowQueryVo;
import com.wenda.admin.vo.StatisticVO;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Repository
public interface FlowMapper extends BaseMapper<TbFlow> {
    @SelectProvider(type = StatisticProvider.class, method = "statistic")
    List<StatisticVO> statistic(FlowQueryVo query);


    @Select("SELECT * from tb_flow WHERE create_time BETWEEN #{startTime} AND #{endTime}")
    List<TbFlow> flowList(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
}
